package com.onegene.pdf.component.report.cancer;

import com.itextpdf.kernel.colors.Color;
import com.itextpdf.kernel.colors.DeviceRgb;
import com.itextpdf.layout.Style;
import com.onegene.pdf.component.entity.ReportBean;

/**
 * @author: laoliangliang
 * @description:
 * @create: 2020/7/3 17:01
 **/
public class CancerColor {
    public static Color getThemeColor() {
        return new DeviceRgb(18,81,208);
    }
    public static Color getOrange() {
        return new DeviceRgb(255,193,25);
    }
    public static Color getRed() {
        return new DeviceRgb(253,104,125);
    }

    public static Style getLabelColor(ReportBean.ItemsBean itemsBean) {
        Style style = new Style();
        int index = itemsBean.getIndex();
        if (index <= 2) {
            style.setFontColor(getThemeColor());
        } else if (index == 3) {
            style.setFontColor(getOrange());
        }else if (index == 4) {
            style.setFontColor(getRed());
        }
        return style;
    }
}
